"""
    :FORMS: Defining the form class
    :Author: MiaLi
"""
from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, SubmitField
from wtforms.validators import DataRequired, Length


class MessageForm(FlaskForm):
    name = StringField('作者', validators=[DataRequired(), Length(1, 20)],
                       render_kw={'style': 'margin-bottom: 10px;'})
    body = TextAreaField('留言', validators=[DataRequired(), Length(1, 200)])
    submit = SubmitField('提交', render_kw={'style': 'margin-top: 10px;'})
